package com.gitee.feizns.itrip.personal.trade.service;

import com.gitee.feizns.itrip.personal.beans.pojo.HotelOrder;
import com.gitee.feizns.itrip.personal.trade.entity.vo.ForViewConfirmOrder;
import com.gitee.feizns.itrip.personal.trade.entity.vo.ForViewCreateQcCode;

import static com.gitee.feizns.itrip.personal.mapper.HotelOrderMapper.PAY_TYPE_ALI_PAY;
import static com.gitee.feizns.itrip.personal.mapper.HotelOrderMapper.PAY_TYPE_WE_CHAT_PAY;

/**
 * @author feizns
 * @since 2019/1/13 0013
 */
public interface TradeHotelOrderService {

    /**
     * 支付宝支付
     */
    int ALI_PAY_TYPE = PAY_TYPE_ALI_PAY;

    /**
     * 微信支付
     */
    int WE_CHAT_PAY_TYPE = PAY_TYPE_WE_CHAT_PAY;

    /**
     * 获取订单确认信息
     * @param orderNo
     * @return
     */
    ForViewConfirmOrder toPayOrder(String orderNo);

    /**
     * 确认订单订单并修改库存
     * @param orderNo
     * @param tradeNo
     * @param payType
     */
    void confirmOrder(String orderNo, String tradeNo, int payType);

    /**
     * 根据订单编号获取订单id
     * @param orderNo
     * @return
     */
    Long getOrderIdByOrderNo(String orderNo);

    /**
     * 根据订单编号获取订单
     * @param orderNo
     * @return
     */
    HotelOrder get(String orderNo);

    /**
     * 根据订单编号获取订单信息
     * @param orderNo
     * @return
     */
    ForViewCreateQcCode getOrderForViewCreateQcCode(String orderNo);

}
